package model

const (
	TaskWorkOrderNotProcessed int64 = 0 // 未处理
	TaskWorkOrderProcessed    int64 = 1 // 已处理
	TaskWorkOrderExpired      int64 = 2 // 已失效
	TaskWorkOrderProgress     int64 = 3 // 处理中
)

type TaskWorkOrder struct {
	Id                  int64  `json:"id" gorm:"column:id"`
	Type                string `json:"type" gorm:"column:type"`
	Number              string `json:"number" gorm:"column:number"`
	Status              int64  `json:"status" gorm:"column:status"`
	TaskId              int64  `json:"task_id" gorm:"column:task_id"`
	VersionId           int64  `json:"version_id" gorm:"column:version_id"`
	ReviewRequestNodeId int64  `json:"review_request_node_id" gorm:"column:review_request_node_id"`
	CreatedBy           int64  `json:"created_by" gorm:"column:created_by"`
	Receiver            int64  `json:"receiver" gorm:"column:receiver"`
	Created             int64  `json:"created" gorm:"column:created"`
	TenantId            int64  `json:"tenant_id" gorm:"column:tenant_id"`
	Json                string `json:"json" gorm:"column:json"`
	CreatedByUnread     string `json:"created_by_unread" gorm:"column:created_by_unread"`
	ReceiverUnread      string `json:"receiver_unread" gorm:"column:receiver_unread"`
}

// 设置表名
func (TaskWorkOrder) TableName() string {
	return "task_work_order"
}
